<!-- 产品类型 -->
<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/index.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/autoComplete.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/css/reset.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/alert.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/alert-form.css">
</script>
<div class="layui-form layui-fluid row" lay-filter="myform">
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            设备型号：
        </label>
        <div class="layui-input-block">
            <input type="text" name="tcParFii02" required lay-verify="required" autocomplete="off"  class="layui-input" id="tcProdCode">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            参数名称：
        </label>
        <div class="layui-input-block">
            <input type="text" name="tcParName" required lay-verify="required" autocomplete="off"  class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            参数单位：
        </label>
        <div class="layui-input-block">
            <input type="text" name="tcParUnit" required lay-verify="required" autocomplete="off"  class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            参数数值：
        </label>
        <div class="layui-input-block">
            <input type="text" name="tcParValue" required lay-verify="required" autocomplete="off"  class="layui-input">
        </div>
    </div>
    <div class="footer layui-form-item layui-fluid" style="margin-top: 30px;">
        <button data-lang="confirm" class="btn1 layui-btn layui-btn-radius layui-btn-primary"
            lay-filter="submit" lay-submit>确定</button>
        <button data-lang="cancel" class="btn2 layui-btn layui-btn-radius layui-btn-primary">取消</button>
    </div>
</div>
<script>
    layui.use(['table', 'admin', 'laypage', 'jquery', 'laytpl', 'tree', 'form', 'api', 'view', 'laydate', 'setter', 'treeSelect','element','utill'], function () {
         var form = layui.form;
         var table = layui.table;
         var admin = layui.admin;
         var laypage = layui.laypage;
         var $ = layui.jquery;
         var laytpl = layui.laytpl;
         var tree = layui.tree;
         var api = layui.api;
         var view = layui.view;
         var laydate = layui.laydate;
         var setter = layui.setter;
         var treeSelect = layui.treeSelect;
         var utill = layui.utill;
         var element = layui.element;
         utill.fuzzmatch('#tcProdCode', {
            isShowValue: false,
            reqObj: {
                url: api.host + '/fil/querySelectFiiFileList.json',
                type: 'POST',
                dataType: 'json',
                contentType: 'application/json',
                data:JSON.stringify({
                    fii05:$('#tcProdCode').val(),
                    pageNum: 1,
                    pageSize: 10000
                }),
            },
            dataTrans: function (res) {
                return res.data.list.map((item) => {
                    return {
                        label: item.fii02,
                        value: item.fii02,
                        data: item
                    }
                })
            },
            done:function(res){
                form.val('myform',{
                    'tcParFii02': res.data.fii02
                })
            }
        });
    });
</script>